import org.omg.CORBA.PUBLIC_MEMBER;

import java.util.ArrayList;
import java.util.List;

public class exercises {
    //CVTE:删除第一个字符串中出现在第二个字符串中的字符
    public static void func(String str1,String str2) {
        List<Character> ret = new ArrayList<>();
        for(int i = 0; i < str1.length(); i++) {
            char ch = str1.charAt(i);
            if(!str2.contains(ch+"")) {
                ret.add(ch);
            }
        }
        //System.out.println(ret);

        for(int i = 0; i < ret.size(); i++) {
            System.out.print(ret.get(i));
        }
        System.out.println();
    }


    //杨辉三角
    public static List<List<Integer>> generate(int numRows) {
        List<List<Integer>> ret = new ArrayList<>();
        List<Integer> list = new ArrayList<>();
        list.add(1);
        ret.add(list);
        for(int i = 1; i < numRows; i++) {
            List<Integer> curRows = new ArrayList<>();
            //最开始的一个数字1
            curRows.add(1);

            //处理中间数字
            List<Integer> preRow = ret.get(i-1);
            for(int j = 1; j < i; j++) {
                int val = preRow.get(j) + preRow.get(j-1);
                curRows.add(val);
            }
            //最后一个数字1
            curRows.add(1);
            ret.add(curRows);
        }
        return ret;
    }

    public static void main(String[] args) {
        String str1 = "welcome to China";
        String str2 = "come";
        func(str1,str2);

        List<List<Integer>> ret  = generate(6);
        System.out.println(ret);
    }

}
